package com.surfilter.platform.base.exception;

import org.apache.log4j.Logger;

import com.surfilter.platform.base.model.ResultCode;

public class CustomException extends ExceptionBase {

	public CustomException(String msg) {
		super(msg);
		setErrorCode(ResultCode.USER_ERROR_CODE);
	}

	public CustomException(Throwable t) {
		super(t);
	}

	public CustomException(String msg, Throwable t) {
		super(msg, t);
	}

	private static final long serialVersionUID = 2663491170730002744L;

	protected void setErrorCode(int code) {
		this.errorCode = code;
	}
	
	

	/* (non-Javadoc)
	 * @see com.surfilter.platform.base.exception.ExceptionBase#getErrorCode()
	 */
	@Override
	public int getErrorCode() {
		return this.errorCode;
	}

	protected Logger getLogger() {
		return Logger.getLogger(this.getClass());
	}

}
